//
//  MSUINavigationController+Additions.h
//  MusouKit
//
//  Created by danal on 13-4-8.
//  Copyright (c) 2013年 danal. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface NSBundle (CLExtension)

/// 对比版本号，是否为新版本
+ (BOOL)isNewVersion:(NSString *)appVersion;

/// app版本号
+ (NSString *)appVersion;
/// appBuild号
+ (NSString *)appBuild;

/// 通过资源名称返回资源的路径
+ (NSString *)pathForResource:(NSString *)res;

/// 通过资源名称返回资源的url路径
+ (NSURL *)urlForResource:(NSString *)res;

@end

@interface UIScreen (CLExtension)

+ (CGRect)screenBounds;

+ (CGSize)screenSize;

+ (CGFloat)screenWidth;

+ (CGFloat)screenHeight;

@end

extern CGRect ScreenBounds();
extern CGSize ScreenSize();
extern CGFloat ScreenWidth();
extern CGFloat ScreenHeight();


@interface UIDevice (CLExtension)

+ (BOOL)isPhone;

+ (BOOL)isPad;

/// 是否越狱
+ (BOOL)isJailbroken;

/// 设备震动
+ (void)playVibrate;

/// 播放铃声
+ (void)playEffect:(NSString *)soundFile;

/// 设备类型，e.g. iPhone 4
+ (NSString *)deviceType;

/// mac 地址
+ (NSString *)MACAddress;


@end


@interface UIApplication (CLExtension)

+ (double)currentTimestamp;

+ (double)machTimeToSecs:(uint64_t)time;

@end




//
////CGContext
//typedef enum {
//    kRounderCornerPostionAll = 0,
//    kRounderCornerPostionTop,
//    kRounderCornerPostionLeft,
//    kRounderCornerPostionBottom,
//    kRounderCornerPostionRight,
//} RounedCornerPosition;
//
//void CGAddRoundedCornerPath(CGRect rect, float corner, RounedCornerPosition position, CGContextRef c);
//
//void CGDrawLinearGradient(NSArray *cgColors, CGPoint start, CGPoint end, CGContextRef c);
